import Vue from 'vue'
import App from './App.vue'
import router from './router'
// import store from './store'
// Vue.config.productionTip = false
import VideoPlayer from 'vue-video-player'
import 'vue-video-player/src/custom-theme.css'
import 'video.js/dist/video-js.css'
import ElementUI from 'element-ui'
import VueCookie from 'vue-cookies'
import 'element-ui/lib/theme-chalk/index.css'
import store from '@/store'
import particles from 'particles.js'
import axios from '../utils/API.js'
import requestcode from './api/request.js'
// 在这里初始化事件总线，并挂载到 Vue 实例的原型上
const eventBus = new Vue()
Vue.prototype.$requestcode = requestcode
Vue.prototype.$eventBus = eventBus
Vue.prototype.$store = store
Vue.prototype.$axiosApi = axios
Vue.use(particles)
Vue.use(VideoPlayer)
Vue.use(ElementUI)
Vue.use(VueCookie)
// window.addEventListener('load', function () {
//   sessionStorage.setItem('isReload', 'true')
// })
// window.addEventListener('beforeunload', function () {
//   const isReload = sessionStorage.getItem('isReload')
//   alert(isReload)
//   if (isReload) {
//     alert(isReload)
//     sessionStorage.setItem('isReload', 'false')
//     return
//   }
//   localStorage.clear()
// })
// window.addEventListener('copy', function (event) {
//   // alert('复制成功')
//   event.preventDefault()
//   // this.$message({
//   //   message: '付钱才能复制',
//   //   type: 'danger'
//   // })
//   alert('付钱才能复制')
// })

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
